package org.insidesource.flexbugs.dao.impl;

import java.util.List;

import org.insidesource.flexbugs.dao.CommentDao;
import org.insidesource.flexbugs.model.Comment;
import org.springframework.orm.jpa.support.JpaDaoSupport;

public class CommentDaoJpaImpl extends JpaDaoSupport implements CommentDao
{

	public void deleteAllCommentsForIssueId(Long issueId)
	{
		
	}

	public Comment get(Long id)
	{
		return this.getJpaTemplate().find(Comment.class, id);
	}

	public List<Comment> getCommentsByIssueId(Long issueId)
	{
		return null;
	}

	public void remove(Long id)
	{
		this.getJpaTemplate().remove(get(id));
	}

	public void save(Comment comment)
	{
		this.getJpaTemplate().persist(comment);
	}

}
